package com.atguigu.rabbit.consumer.listener.workqueen;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.nio.charset.StandardCharsets;

/**
 * @Author: Worker Hu
 * @CreateTime: 2024-07-23  15:44
 */
@Component
public class WorkQueue02 {

    @RabbitListener(queues = "work_queue")
    public void comsume(Message message){
        System.out.println("WorkQueue02: " + new String(message.getBody(), StandardCharsets.UTF_8));
    }
}


